package com.experiment05.resource;


import com.experiment05.entity.College;
import com.experiment05.entity.Student;
import com.experiment05.entity.Teacher;

import java.util.List;

public class DatabaseUtils {
    public static final List<Student> STUDENTS  = create();
    private static List<Student> create(){
        College c1 = new College("计算机");
        College c2 = new College("电子信息");

        Teacher t1 = new Teacher(0000, "张老师");
        t1.setCollege(c1);
        Teacher t2 = new Teacher(0001, "刘老师");
        t2.setCollege(c2);

        Student s1 = new Student(202121,"熊大",2021 );
        s1.setTeacher(t1);
        Student s2 = new Student(202122,"熊二", 2022);
        s2.setTeacher(t1);
        Student s3 = new Student(202123,"光头强", 2021);
        s3.setTeacher(t2);
        Student s4 = new Student(202124,"翠花",2022 );
        s4.setTeacher(t2);

        return List.of(s1,s2, s3, s4);
    }
    public static List<Student> listStudents() {
        return STUDENTS;
    }


}
